<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>extends</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
  <h1>extends</h1>
  <hr>
  <div id="app">
    ${num}
    <p><button @click="add">add</button></p>
  </div>
  <script type="text/javascript">
  var extendsObj={
    updated:function(){
      console.log('我是扩展的updated');
    },
    methods:{
      add:function(){
        console.log('我是扩展的add');
        this.num++;
      }
    }
  }
  var app = new Vue({
    el:'#app',
    data:{
      num:1
    },
    methods:{
      add:function(){
        console.log('我是原生的add');
        this.num++;
      }
    },
    updated:function(){
      console.log('我是原生的updated');
    },
    extends:extendsObj,
    delimiters:['${','}']//分隔符修改
  })
  </script>
</body>
</html>